import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import ElementUI from "element-ui";
// import "element-ui/lib/theme-chalk/index.css";
// import './elmentColor/index.css'
import "@/theme/theme/index.css";
// import "./elementCss/element.sass";
import VueAMap from "vue-amap";
Vue.use(VueAMap);
// 初始化地图  ************************需要把引入的插件写全 否则 会报错  https://www.cnblogs.com/huangla/p/15014318.html*********************************
VueAMap.initAMapApiLoader({
  key: "052c47d72b94e793ea5d103fb17be49a",
  plugin: [
    "AMap.Autocomplete", //输入提示插件
    "AMap.PlaceSearch", //POI搜索插件
    "AMap.Scale", //右下角缩略图插件 比例尺
    "AMap.OverView", //地图鹰眼插件
    "AMap.ToolBar", //地图工具条
    "AMap.MapType", //类别切换控件，实现默认图层与卫星图、实施交通图层之间切换的控制
    "AMap.PolyEditor", //编辑 折线多，边形
    "AMap.CircleEditor", //圆形编辑器插件
    "AMap.Geolocation", //定位控件，用来获取和展示用户主机所在的经纬度位置
    "MarkerClusterer",
    "AMap.HeatMap",
    "AMap.DistrictLayer",
    "AMap.Heatmap",
    "AMap.DistrictSearch",
    "AMap.Object3DLayer",
  ], // 插件集合
  v: "1.4.4",
});

import http from "./api/http";
import Print from "vue-print-nb";
import global_ from "./config/global";

// 引入图片预览下载组件
import ELImageViewer from "@/components/ELImageView/imgView.vue";
Vue.component("ELImageViewer");
// 引用时间格式化
import moment from "moment";
// moment格式化时间格式
Vue.prototype.timeFormat = function (time, format) {
  return moment(time).format(format);
};
import {
  Field,
  Button,
  Col,
  Row,
  Toast,
  Uploader,
  List,
  Cell,
  CellGroup,
  Popup,
  Dialog,
} from "vant";
import "vant/lib/index.css";
import vueEsign from "vue-esign";
import htmlToPdf from "./utils/htmlToPdf";
import "./antd";
import VueDragResize from "vue-drag-resize";
import JsEncrypt from "jsencrypt"; // 加密

import elTableInfiniteScroll from "el-table-infinite-scroll";
// 注册全部面包屑导航
import MyBreadcrumb from "@/components/myBreadcrumb";
Vue.component("my-breadcrumb", MyBreadcrumb);

Vue.use(elTableInfiniteScroll);

Vue.component("vue-drag-resize", VueDragResize);
Vue.prototype.$JsEncrypt = JsEncrypt;
Vue.prototype.$baseUrl = global_.BASE_URL;
Vue.prototype.$http = http;
Vue.config.productionTip = false;
// 需要添加Vue.config.devtools = true;  浏览器才会显示vue-devtools插件
Vue.config.devtools = true;

// console.log = function () {}

Vue.use(Print);
Vue.use(ElementUI);
Vue.use(htmlToPdf);
Vue.use(vueEsign);
Vue.use(Button);
Vue.use(Field);
Vue.use(Col);
Vue.use(Row);
Vue.use(Toast);
Vue.use(Uploader);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(List);
Vue.use(Popup);
Vue.use(Dialog);
new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
